www.gusucode.com > 基于Matlab的MIMO通信系统仿真 含报告;司中威;了解移动通信 > 基于Matlab的MIMO通信系统仿真 含报告;司中威;了解移动通信关键技术,了解数字通信系统仿真流程,实现基本的信道编译码、调制解调等通信模块。(好评如潮,课设拿满) 学习并实现MIMO空时处理技术 学习性能分析的思路和方法/mimo/matlab for mimo 2x2/read_float32_hex.m
function A=read_float32_hex(name) % % A = read_float32_hex(filename) % % Read the single precision floating-point values % stored in a Code Composer Studio .dat file. % % Return value: A = vector containing elements from .dat file fid = fopen(name,'rt'); x = fscanf(fid,'%d',2); if x(1) ~= 1651 | x(2) ~= 1 error('Not a valid hex-format .dat file!') end % there is no way to directly convert a string of hex-coded % bits into the corresponding floating point value % we have to trick matlab by writing to an intermediate binary % file x = fscanf(fid,'%s',3); x = fscanf(fid,'%c',1); x = fscanf(fid,'%c'); x = reshape(x,[11 length(x)/11]); x = x(3:end-1,:); x = reshape(x,[2 length(x(:))/2]).'; x = hex2dec(x); % the byte order in x is big endian fid2 = fopen('tmp_rw_file','w+','ieee-be'); fwrite(fid2,x,'uint8'); frewind(fid2); A = fread(fid2,'float32'); fclose(fid); fclose(fid2); delete('tmp_rw_file')